//
//  Model.m
//  A段项目
//
//  Created by dllo on 16/1/22.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "Model.h"

@implementation Model

- (void)dealloc {
    
    [_url release];
    
    [_coverUrl release];
    
    [_summary release];
    
    [_title release];
    
    [_introduce release];
    
    [_data release];
    
    [_linkData release];
    
    [_text release];
    
    [_imageUrl release];
    
    [_captionCn release];
    
    [_sourceData release];
    
    [_tag release];
    
    [_type release];
    
    [_endDate release];
    
    [_creatTime release];
    
    [_user release];
    
    [_md5 release];
    
    [_imageName release];
    
    [_image release];
    
    [_content release];
    
    
    
    [super dealloc];
}

- (void)encodeWithCoder:(NSCoder *)aCoder  {
    
    [aCoder encodeObject:self.data forKey:@"data"];
    
    [aCoder encodeObject:self.url forKey:@"url"];
    
    [aCoder encodeObject:self.sourceData forKey:@"sourceData"];
    
    [aCoder encodeObject:self.introduce forKey:@"introduce"];
    
    NSNumber *style = [NSNumber numberWithInteger:self.style];
    
    [aCoder encodeObject:style forKey:@"style"];
    
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    
    self = [super init];
    
    if (self) {
        
        self.data = [aDecoder decodeObjectForKey:@"data"];
        
       self.sourceData = [aDecoder decodeObjectForKey:@"sourceData"];
        
        self.introduce = [aDecoder decodeObjectForKey:@"introduce"];
        
        NSNumber *number = [aDecoder decodeObjectForKey:@"style"];
        
        self.style = number.integerValue;
        
        self.url = [aDecoder decodeObjectForKey:@"url"];
        
       
    }
    
    return self;
}




- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
  
    
}

@end
